package cn.yunhe.service.impl;

import cn.yunhe.beans.Order;
import cn.yunhe.dao.OrderDao;
import cn.yunhe.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author herbert
 * @date 2021/2/6
 */
@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    OrderDao orderDao;

    @Override
    public List<Order> queryOrderList() {
        return orderDao.queryOrderList();
    }

    @Override
    public Order queryOrderById(int orderId) {
        return orderDao.queryOrderById(orderId);
    }

    @Override
    public int updateOrder(Order order) {
        return orderDao.updateOrder(order);
    }

    @Override
    public int insertOrder(Order order) {
        return orderDao.insertOrder(order);
    }

    @Override
    public int deleteOrder(int orderId) {
        return orderDao.deleteOrder(orderId);
    }

    @Override
    public int deleteAll(Integer[] orderIds) {
        return orderDao.deleteAll(orderIds);
    }
}
